home *** CD-ROM | disk | FTP | other *** search
/ Celestin Apprentice 4 / Apprentice-Release4.iso / Languages / MacMETH 3.2.3 / MEdit ƒ / Macros ƒ / MacroCmds QuickRef next >
Text File  |  1995-12-13  |  5KB  |  90 lines

  1. MEdit / MComp macro commands:
  2. ****************************
  3.  
  4. name    type        arg(s)        explanation
  5.  
  6. • Dialog commands:
  7. ALERT     P        $        displays an alert given by $
  8. EALERT    P        $,$        displays an "error" alert given by $,$
  9. PROMPT    (B)        $,{$|#}        opens a dialog, writes $ and allows to edit $|#
  10. KEYCOD    P        -        opens a dialog to determine and insert a keycode & modifier
  11.  
  12. • Control commands:
  13. CALL      P        #        executes macro number # of the actually loaded macro file
  14. IF        P        B,cmd        executes only if B true
  15. WHILE     P        B,cmd        executes cmd as long as B remains true
  16. SET       P        {$|#},$|#    assigns the second arg to the first of same type
  17. NOT       B        B        negates the following boolean expression B
  18.  
  19. • File commands:
  20. QSAVAS    (B)        $        Save As… dialog with suggested name $, returns if saved
  21. SAVEAS    P        [$]        saves a file under name $ if specified, otherwise
  22.                             opens Save As… dialog with the actual windowname proposed
  23. SAVE      P        -        saves the frontwindow to disk, if title=Untitled asks for filename
  24. OPEN      (B)        [$]        opens file $ if specified, otherwise use standard openfile dialog
  25.                             returns true if opened (boolean version omits error alerts)
  26. CLOSE     P        -        closes the frontwindow
  27. PRINT     P        -        prints the frontwindow's content
  28. NEW       P        -        opens an empty window and make it the active window
  29.  
  30. • Window commands:
  31. SCRH      #        -        returns screen height
  32. SCRW      #        -        returns screen width
  33. PLACEW    P        #,#,#,#        places & resizes the active window
  34. WINDOW    (B)        #        selects window # (first is 0; after macro exec the active becomes
  35.                             the frontwindow), returns if exists
  36.  
  37. • Editing commands:
  38. SELABS    (B)        #        selects the absolute position #, returns if < eof
  39. ABSPOS    #        -        returns the absolute position of start of selection
  40. INSERT    P        $        inserts the $ at the current selection ni the frontwindow
  41. SELECT    P        #,#["|"#,#]    selects position #,#; if specified until ["|"#,#]
  42. SECT      (B)        #        selects section # of frontwindow, returns wheter it exists
  43. PASTE     P        -        pastes the content of the clipboard to the actual position
  44. COPY      P        -        copies the current selection to the clipboard
  45. CUT       P        -        cuts out the current selection and copies it to the clipboard
  46. CLEAR     P        -        clears out the current selection
  47. PUSH      P        -        pushes the ref. of the current selection onto a 8 level stack
  48. POP       P        -        takes and selects the selection ref. from the stack and decrements the stack
  49. DROP      P        -        cancelles the curr. stacklevel and decrements the stack
  50. APPEND    P        -        appends a new empty section to the frontwindow
  51. FIND      (B)        $        find and select next ocurrence of $, returns whether found
  52. EFIND     (B)        $        find and select next ocurrence of expression $, returns whether found
  53.  
  54. • String commands (strings start with index 1):
  55. $S        $        -        returns the current selection of the frontwindow
  56. CAP       $        $        capitalize str
  57. DECAP     $        $        decapitalize str
  58. STR       $        #        converts # to a string $
  59. VAL       #        $        converts the first number in $ to #
  60. CHR       $        #        returns the ascii character with ordinal number #
  61. ORD       #        $        returns the ordinal number of the ascii character $
  62. STRCMP    #        $,$,#        compares first and second $ (# =0 ignore case) and returns
  63.                             0 if equal, -1 if first $ is smaller, +1 if first is greater
  64. SUBSTR    $        $,#,#        returns a substring of $, starting at # and with # character length
  65. CONCAT    $        $[,$]        returns a string resulting of concatenation of all $ (maxlength = 255)
  66. LEN       #        $        returns the length of string $
  67. STRPOS    #        $,$,#        returns the position of substr in str starting from #
  68. PUTSTR    (B)        #,$        writes a str to resource with id #, returns if successfully stored
  69.                             (allowed range: [0 ≤ # 999] internally stored on 'STR ' 3000-3999)
  70. GETSTR    $        #        reads a str from resource with id #, returns '' if nonexistent id
  71.  
  72. DATE      $        #        returns the actual date in a string, # is the format (0=short, 1=long, 2=abbrev)
  73. TIME      $        #        returns the actual time in a string, # is the format (0=no secs, 1=secs)
  74. WNAME     $        -        returns the name of the front window
  75.  
  76. • HighLevel-Events commands:
  77. POSTHL    B            $,$,#,#,#    post's high-level-event. Receiver is a application (in memory) with 
  78.                     creator (first $). EventClass is second $. EventID is first # (High-Word)
  79.                     and second # (Low-Word). Third # is msgVal. Further explainations see inside
  80.                     Macintosh V. POSTHLE returns TRUE if posting was possible.
  81.  
  82.  
  83.  
  84. LEGEND:
  85. P = procedure;
  86. $ = string value (function result/argument) or expression (argument);
  87. # = numeric value (function result/argument) or expression (argument);
  88. B = boolean value (function result/argument) or expression (argument);
  89. () = optional result;  [] = optional argument;
  90. | = alternative argument;  {} = must be variable;  - = no argument.